package com.zjh.orderServer.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zjh.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface OrderMapper extends BaseMapper<Order> {
    void deleteByCondition(@Param("uid") Integer uid, @Param("mid")Integer mid, @Param("aid")Integer aid);

    void saveOrder (Order order);

    List<Order> findAllByUid(Integer uid,Integer begin,Integer len);

    int countByUid(Integer id);

    List<Order> findAllByState(Integer state,Integer begin,Integer len);

    int countByState(Integer state);

    void updateState(Integer id,Integer aid,Integer state);
}
